<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <title>分配权限</title>
    <th:block th:replace="~{/backstage/common_resources::common_css}"/>
    <th:block th:replace="~{/backstage/common_resources::common_js}"/>
</head>

<!-- 第二个设置颜色-->
<body class="hold-transition skin-black-light sidebar-mini">
<!--    头部-->
    <header th:replace="~{/backstage/common_header::header}"></header>
<!--边栏-->
    <aside th:replace="~{/backstage/common_aside::aside}"></aside>

<!-- 内容区域 -->
<!-- @@master = admin-layout.html-->
<!-- @@block = content -->

<div class="content-wrapper">

    <!-- 内容头部 -->
    <section class="content-header">
        <h1>
            角色管理
            <small>权限列表</small>
        </h1>
        <ol class="breadcrumb">
            <li><a th:href="@{/backstage/index}"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a th:href="@{/backstage/role/all}">角色管理</a></li>
            <li class="active">权限列表</li>
        </ol>
    </section>
    <!-- 内容头部 /-->

    <!-- 正文区域 -->
    <section class="content">

        <!-- .box-body -->
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">权限列表</h3>
            </div>

            <div class="box-body">

                <!-- 数据表格 -->
                <div class="table-box">

                    <form th:action="@{/backstage/role/updatePermission}">
                        <input th:value="${rid}" name="rid" hidden>
                        <!--数据列表-->
                        <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
                            <thead>
                            <tr>
                                <th class="" style="padding-right:0px;">
                                    <input id="selall" type="checkbox" class="icheckbox_square-blue">
                                </th>
                                <th>权限名</th>
                                <th>权限详情</th>

                            </tr>
                            </thead>
                            <tbody>
                            <!--adminPage.records返回当前页数据返回值是list-->
                            <tr th:each="permission:${permissions}">
                                <td th:if="${permission.permissionHas}">
                                    <input name="ids" type="checkbox" th:value="${permission.peid}"  class="icheckbox_square-blue" checked>
                                </td>
                                <td th:if="!${permission.permissionHas}">
                                    <input name="ids" type="checkbox" th:value="${permission.peid}"  class="icheckbox_square-blue">
                                </td>

                                <td th:text="${permission.permissionName}"></td>
                                <td th:text="${permission.permissionDesc}"></td>

                            </tr>

                            </tr>

                            </tbody>

                        </table>
                        <!--数据列表/-->
                        <div class="col-md-1 title"></div>
                        <div class="col-md-10 data text-center">
                            <button type="submit" class="btn bg-maroon" >保存</button>
                            <button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
                        </div>
                    </form>



                </div>
                <!-- 数据表格 /-->


            </div>
            <!-- /.box-body -->




        </div>

    </section>
    <!-- 正文区域 /-->

</div>
<!-- @@close -->
<!-- 内容区域 /-->


<!--底部-->
<footer th:replace="~{/backstage/common_footer::footer}"></footer>


</body>

</html>